import axios from "axios";

axios.interceptors.request.use( (config:any) =>{

    // console.log( config );

    let uniacid : any;
    uniacid = localStorage.getItem('uniacid');
    
    if( uniacid == null ){
        uniacid = 13;
        localStorage.setItem('uniacid', uniacid );
    }

    if( config.url.indexOf('?') > -1 ){
        config.url += '&i=' + uniacid;
    }else{
        config.url += '?i=' + uniacid;
    }

    return config;
})

export default axios;